#include "SypEngine.h"

#ifdef CHECKMEM
#include "mmgr.h"
#endif
namespace Syp
{

void SypEngine::initCorePack()
{
	//Passes
	SamplePass* sp = new SamplePass();
	CPUSkinning* cp = new CPUSkinning();
	GPUSkinning* gpu = new GPUSkinning();
//	VertexLightingShader* vsl = new VertexLightingShader();
	GuiPass* gp = new GuiPass();
	

	//Effects
	Effect* de = Effect::createEffect("Skinning","Applies Skinning using the GPU if supported, else fallsback to CPU skinning.",110);
	de->addPass("GPUSkinning");
	if(!EffectRegistry::getRegistry().addEffect(de))//if we fail to add in a  GPU Pass
	{
		de = Effect::createEffect("Skinning","Applies Skinning using the CPU.", 100);
		de->addPass("CPUSkinning");
		EffectRegistry::getRegistry().addEffect(de);
	}



	de = Effect::createEffect("DefaultFF","The default effect which does nothing, resulting in the usage of the Fixed-Functionality pipeline.", 100);
	de->addPass("SamplePass");
	EffectRegistry::getRegistry().addEffect(de);

	//de = Effect::createEffect("ShaderFF","Shaders emulating the Fixed- Functionality pipeline",100);
	//de->addPass("VertexLightingShader");
	//EffectRegistry::getRegistry().addEffect(de);

	de = Effect::createEffect("GuiFF","Similar to the Fixed - Functionality pipeline, but ensures that all geometry drawn with this effect will be drawn last and not be depth-tested with the framebuffers.",100);
	de->addPass("GuiPass");
	EffectRegistry::getRegistry().addEffect(de);

}
}
